package a.d.a;

import a.c.d;
import a.c.e;
import a.c.*;
import a.d.b.t;
import a.f.j.ab;
import a.i.l;

import java.util.*;

public class c
{
  protected static final int a = 0;
  protected static final int b = 1;
  protected int c;
  private a.d.b.n e;
  private j_ f;
  private q g;
  private a.c.n h;
  private a.c.x j;
  private h_ k;
  public static int l;
  public static boolean m;
  
  public void a(j_ paramj_)
  {
    this.f = paramj_;
  }
  
  public void a(a.d.b.n paramn, Collection paramCollection, h_ paramh_)
  {
    this.k = paramh_;
    this.g = null;
    this.h = null;
    this.j = null;
    this.c = 1;
  }
  
  public void a(a.d.b.n paramn, Collection paramCollection, ab paramab, a.c.x paramx, a.c.n paramn1)
  {
    boolean bool = m;
    int n = l;
    this.g = paramab.a();
    this.g.o();
    this.j = paramx;
    this.h = paramn1;
    this.c = 0;
    a(paramn, paramCollection);
    ArrayList localArrayList = new ArrayList(this.g.m());
    m localm = this.g.w();
    if (localm.e()) {}
    while (bool)
    {
      localArrayList.add(localm.a());
      localm.f();
      if (bool) {
        break label139;
      }
      if (n != 0) {
        break label138;
      }
      if (n == 0) {
        break;
      }
    }
    l.a(localArrayList, new f_(paramn1));
    label138:
    label139:
    int i = 0;
    label250:
    do
    {
      do
      {
        if (i >= localArrayList.size()) {
          break;
        }
        d locald1 = (d)localArrayList.get(i);
        d locald2 = this.g.a(locald1.f(), locald1.f().h(), locald1.e(), null, 1, 1);
        paramab.a(locald1, locald2);
        c_ localc_ = (c_)paramn1.get(locald1);
        if (!bool)
        {
          if (localc_.c()) {
            paramab.g(locald1);
          }
        }
        else
        {
          if (bool) {
            continue;
          }
          if (n == 0) {
            break label250;
          }
        }
        paramab.g(locald2);
        paramn1.a(locald1, localc_.g);
        paramn1.a(locald2, localc_.g);
        i++;
      } while (n == 0);
    } while (bool);
    if (!bool)
    {
      if (q.n) {
        n++;
      }
    }
    else {
      l = n;
    }
    if (q.o) {
      m = !bool;
    }
  }
  
  public void a(a.d.b.n paramn, Collection paramCollection, q paramq, a.c.x paramx, a.c.n paramn1)
  {
    int i = l;
    this.g = paramq;
    paramq.o();
    this.j = paramx;
    this.h = paramn1;
    this.c = 0;
    a(paramn, paramCollection);
    m localm = paramq.w();
    do
    {
      if (!localm.e()) {
        break;
      }
      d locald = localm.a();
      Object localObject = ((c_)paramn1.get(locald)).g;
      paramn1.a(locald, localObject);
      localm.f();
    } while (i == 0);
  }
  
  public void a(a.d.b.n paramn, Collection paramCollection)
  {
    boolean bool = m;
    int i1 = l;
    this.e = paramn;
    TreeMap localTreeMap = new TreeMap(paramn.a());
    g_ localg_ = new g_(null);
    a(paramCollection, localTreeMap, localg_);
    c_[] arrayOfc_ = new c_[2];
    ArrayList localArrayList = new ArrayList();
    e locale = null;
    label267:
    label269:
    label332:
    label333:
    do
    {
      do
      {
        if (localTreeMap.isEmpty()) {
          break;
        }
        Object localObject1 = localTreeMap.firstKey();
        i_ locali_ = (i_)localTreeMap.get(localObject1);
        Object localObject2 = locali_.c;
        localTreeMap.remove(localObject1);
        if (!bool) {
          if (this.f != null) {
            this.f.a(locali_);
          }
        }
        do
        {
          localg_.a(localObject2, localArrayList, arrayOfc_);
          if (!bool)
          {
            if (this.c == 0)
            {
              locale = this.g.i();
              this.j.a(locale, localObject2);
              i = 0;
              do
              {
                if (i >= localArrayList.size()) {
                  break;
                }
                localObject3 = (c_)localArrayList.get(i);
                d locald = this.g.a(locale, locale.h(), ((c_)localObject3).a, null, 1, 1);
                this.h.a(locald, localObject3);
                ((c_)localObject3).a = locale;
                i++;
                if (bool) {
                  break label269;
                }
                if (i1 != 0) {
                  break label267;
                }
              } while (i1 == 0);
            }
            if (bool) {
              break;
            }
          }
          i = 0;
          do
          {
            if (i >= locali_.b.size()) {
              break;
            }
            localObject3 = (c_)locali_.b.get(i);
            localg_.a((c_)localObject3);
            i++;
            if (bool) {
              break label333;
            }
            if (i1 != 0) {
              break label332;
            }
          } while (i1 == 0);
        } while (bool);
        localg_.a(localObject2);
        int i = 0;
        do
        {
          do
          {
            if (i >= locali_.a.size()) {
              break;
            }
            localObject3 = (c_)locali_.a.get(i);
            ((c_)localObject3).a = locale;
            if (bool) {
              break label521;
            }
            localg_.a(localObject2, (c_)localObject3);
            i++;
            if (i1 != 0) {
              break label519;
            }
          } while (i1 == 0);
          if (bool) {
            break;
          }
        } while (bool);
        if (this.c == 1)
        {
          localArrayList.addAll(locali_.a);
          i = 0;
          do
          {
            if (i >= localArrayList.size()) {
              break label519;
            }
            localObject3 = localArrayList.get(i);
            if (i1 != 0) {
              break;
            }
            int n = 0;
            do
            {
              if (n >= localArrayList.size()) {
                break;
              }
              Object localObject4 = localArrayList.get(n);
              this.k.a(localObject3, localObject4);
              n++;
              if (bool) {
                break label516;
              }
              if (i1 != 0) {
                break label514;
              }
            } while (i1 == 0);
            if (!bool) {
              i++;
            }
          } while (i1 == 0);
        }
        c_ localc_ = localg_.c(arrayOfc_[0]);
        a(localObject2, localTreeMap, arrayOfc_[0], localc_);
        Object localObject3 = localg_.d(arrayOfc_[1]);
        a(localObject2, localTreeMap, (c_)localObject3, arrayOfc_[1]);
      } while (bool);
    } while (i1 == 0);
    label514:
    label516:
    label519:
    label521:
    return;
  }
  
  private void a(Collection paramCollection, TreeMap paramTreeMap, g_ paramg_)
  {
    boolean bool = m;
    int n = l;
    int i = 0;
    Comparator localComparator = this.e.a();
    double d1 = 1.0D;
    Object localObject1 = paramCollection.iterator();
    do
    {
      i_ locali_1;
      i_ locali_2;
      do
      {
        if (!((Iterator)localObject1).hasNext()) {
          break;
        }
        localObject2 = ((Iterator)localObject1).next();
        localObject3 = this.e.c(localObject2);
        localObject4 = this.e.d(localObject2);
        if (n != 0) {
          break label551;
        }
        if (localComparator.compare(localObject3, localObject4) > 0)
        {
          Object localObject5 = localObject4;
          localObject4 = localObject3;
          localObject3 = localObject5;
        }
        double d2 = this.e.a(localObject3).e();
        double d3 = this.e.b(localObject3).e();
        double d4 = this.e.a(localObject4).e();
        double d5 = this.e.b(localObject4).e();
        if (!bool) {
          if (d2 < 0.0D) {
            d2 = -d2;
          }
        }
        if (!bool) {
          if (d3 < 0.0D) {
            d3 = -d3;
          }
        }
        if (!bool) {
          if (d4 < 0.0D) {
            d4 = -d4;
          }
        }
        if (!bool) {
          if (d5 < 0.0D) {
            d5 = -d5;
          }
        }
        do
        {
          while (n == 0)
          {
            if (d2 < d1) {
              if ((!bool) && ((n == 0) && (((bool) || ((d3 >= d1) || (!bool))) && ((d4 < d1) && ((!bool) && (d5 < d1)))))) {
                break;
              }
            }
            d1 *= 2.0D;
          }
          locali_1 = (i_)paramTreeMap.get(localObject3);
        } while (bool);
        if (!bool) {
          if (locali_1 == null)
          {
            locali_1 = new i_(localObject3);
            paramTreeMap.put(localObject3, locali_1);
          }
        }
        locali_2 = (i_)paramTreeMap.get(localObject4);
        if (!bool) {
          if (locali_2 == null)
          {
            locali_2 = new i_(localObject4);
            paramTreeMap.put(localObject4, locali_2);
          }
        }
      } while (localObject3.equals(localObject4));
      c_ localc_3 = new c_(localObject3, localObject4, localObject2, i++);
      locali_1.a.add(localc_3);
      locali_2.b.add(localc_3);
    } while (n == 0);
    localObject1 = this.e.a(-d1, d1);
    Object localObject2 = this.e.a(d1, d1);
    Object localObject3 = this.e.a(-d1, -d1);
    Object localObject4 = this.e.a(d1, -d1);
    if (!bool) {}
    label551:
    Object localObject6 = this.e.e(localObject1, localObject2);
    Object localObject7 = this.e.e(localObject3, localObject4);
    c_ localc_1 = new c_(localObject1, localObject2, localObject6, i++);
    c_ localc_2 = new c_(localObject3, localObject4, localObject7, i++);
    paramg_.a(localObject1, localc_1);
    paramg_.a(localObject3, localc_2);
  }
  
  protected void a(Object paramObject, TreeMap paramTreeMap, c_ paramc_1, c_ paramc_2)
  {
    boolean bool = m;
    int i1 = l;
    Object localObject = this.e.g(paramc_1.i, paramc_2.i);
    if (localObject == null) {
      return;
    }
    if ((bool) || (this.e.a().compare(paramObject, localObject) < 0))
    {
      int i = 0;
      if (this.e.a().compare(localObject, paramc_1.f) < 0) {
        i = 1;
      }
      paramc_1 = paramc_1.j;
      do
      {
        if ((paramc_1 != null) && (i == 0)) {
          break;
        }
      } while ((bool) || (i1 != 0));
      int n = 0;
      if (this.e.a().compare(localObject, paramc_2.f) < 0) {
        n = 1;
      }
      paramc_2 = paramc_2.j;
      do
      {
        if ((paramc_2 != null) && (n == 0)) {
          break;
        }
      } while ((bool) || (i1 != 0));
      if ((i != 0) && ((bool) || ((n != 0) && (!paramTreeMap.containsKey(localObject)))))
      {
        i_ locali_ = new i_(localObject);
        paramTreeMap.put(localObject, locali_);
      }
    }
  }
  
  public void a(a.d.b.n paramn, Collection paramCollection, q paramq, a.c.x paramx, a.c.n paramn1, boolean paramBoolean)
  {
    boolean bool = m;
    int i5 = l;
    Object localObject1 = paramn.a(paramn.a(new t(0L), new t(0L)), paramn.a(new t(0L), new t(-1L)));
    Comparator localComparator = paramn.a();
    w localw = paramq.v();
    Object localObject5;
    m localm;
    Object localObject6;
    Object localObject7;
    Object localObject8;
    Object localObject9;
    label382:
    do
    {
      if (!localw.e()) {
        break;
      }
      localObject2 = localw.d();
      localObject3 = paramx.get(localObject2);
      double d1 = -1.797693134862316E+308D;
      localObject5 = null;
      if (i5 != 0) {
        break label438;
      }
      localm = ((e)localObject2).n();
      do
      {
        do
        {
          if (!localm.e()) {
            break label402;
          }
          localObject6 = localm.a();
          localObject7 = (c_)paramn1.get(localObject6);
          localObject8 = paramx.get(((d)localObject6).f());
          localObject9 = paramn.a(localObject3, localObject8);
          double d2 = paramn.c(localObject1, localObject9);
          if (i5 != 0) {
            break;
          }
          if (d2 == 0.0D) {
            d2 = 6.283185307179586D;
          }
          if (!bool) {
            if (d2 < d1) {
              a.i.n.a("Error: Edge: " + localObject6 + " Angle: " + d2 / 3.141592653589793D * 2.0D + " !!");
            }
          }
          if (!bool)
          {
            if (d2 == d1)
            {
              if (!bool) {
                if (localComparator.compare(localObject3, localObject8) > 0)
                {
                  if (bool) {
                    continue;
                  }
                  if (((c_)localObject7).d() <= localObject5.d()) {
                    break label382;
                  }
                  a.i.n.a("Error  ....>");
                  if (bool) {
                    continue;
                  }
                  if (i5 == 0) {
                    break label382;
                  }
                  if (!bool) {}
                  q.n = !q.n;
                }
              }
              if (bool) {
                continue;
              }
              if (((c_)localObject7).d() < localObject5.d()) {
                a.i.n.a("Error  ....>");
              }
            }
            d1 = d2;
            localObject5 = localObject7;
            localm.f();
          }
        } while (i5 == 0);
        localw.f();
      } while (bool);
    } while (i5 == 0);
    label402:
    if (!bool) {
      if (bool) {}
    }
    label438:
    int i = paramBoolean ? 2 : 1;
    Object localObject2 = new TreeMap(paramn.a());
    Object localObject3 = paramq.v();
    Object localObject4;
    do
    {
      if (!((w)localObject3).e()) {
        break;
      }
      e locale = ((w)localObject3).d();
      localObject4 = paramx.get(locale);
      localObject5 = ((TreeMap)localObject2).put(localObject4, locale);
      if (!bool)
      {
        if (localObject5 != null) {
          a.i.n.a("Points is double mentioned :" + localObject4);
        }
        ((w)localObject3).f();
      }
    } while (i5 == 0);
    localObject3 = paramCollection.toArray();
    int n = 0;
    label946:
    label964:
    label973:
    do
    {
      if (n >= localObject3.length - 1) {
        break;
      }
      localObject4 = localObject3[n];
      int i1 = n + 1;
      do
      {
        do
        {
          if (i1 >= localObject3.length) {
            break label973;
          }
          localm = localObject3[i1];
          localObject6 = paramn.c(localObject4);
          localObject7 = paramn.c(localm);
          localObject8 = paramn.d(localObject4);
          localObject9 = paramn.d(localm);
          if (i5 != 0) {
            break;
          }
          int i2 = paramn.e(localObject4) ? 0 : 1;
          if (!bool) {}
          int i3 = paramn.e(localm) ? 0 : 1;
          int i4 = 0;
          if (!bool) {
            if (paramn.i(localObject4, localObject7))
            {
              i4 = 1;
              a((TreeMap)localObject2, paramn1, localObject7, localObject4, localm, 2, i3, i);
            }
          }
          if (!bool) {
            if (paramn.i(localObject4, localObject9))
            {
              i4 = 1;
              a((TreeMap)localObject2, paramn1, localObject9, localObject4, localm, 2, i3, i);
            }
          }
          if (!bool) {
            if (paramn.i(localm, localObject6))
            {
              i4 = 1;
              a((TreeMap)localObject2, paramn1, localObject6, localObject4, localm, i2, 2, i);
            }
          }
          if (!bool) {
            if (paramn.i(localm, localObject8))
            {
              i4 = 1;
              a((TreeMap)localObject2, paramn1, localObject8, localObject4, localm, i2, 2, i);
            }
          }
          if (i4 == 0)
          {
            Object localObject10 = paramn.f(localObject4, localm);
            if ((bool) || (localObject10 != null))
            {
              if (!bool) {
                if (!localObject6.equals(localObject10))
                {
                  if (bool) {
                    break label964;
                  }
                  if (!localObject8.equals(localObject10)) {
                    break label946;
                  }
                }
              }
              if (bool) {
                continue;
              }
              if ((!localObject7.equals(localObject10)) && ((bool) || (!localObject9.equals(localObject10)))) {
                a((TreeMap)localObject2, paramn1, localObject10, localObject4, localm, 2, 2, i);
              }
            }
          }
          i1++;
        } while (i5 == 0);
        n++;
      } while (bool);
    } while (i5 == 0);
    if (bool) {
      q.o = !q.o;
    }
  }
  
  protected boolean a(TreeMap paramTreeMap, a.c.n paramn, Object paramObject1, Object paramObject2, Object paramObject3, int paramInt1, int paramInt2, int paramInt3)
  {
    boolean bool = m;
    int i1 = l;
    e locale = (e)paramTreeMap.get(paramObject1);
    if (!bool)
    {
      if (locale == null)
      {
        a.i.n.a("Crossing not found: ");
        a.i.n.a(paramObject2);
        a.i.n.a(paramObject3);
      }
    }
    else
    {
      a.i.n.a(paramObject1);
      return false;
    }
    int i = 0;
    int n = 0;
    m localm = locale.l();
    do
    {
      if (!localm.e()) {
        break;
      }
      d locald = localm.a();
      Object localObject = paramn.get(locald);
      if (bool) {
        break label204;
      }
      if (i1 != 0) {
        break label202;
      }
      if (!bool) {
        if (localObject == paramObject2) {
          i++;
        }
      }
      if (localObject == paramObject3) {
        n++;
      }
      localm.f();
    } while (i1 == 0);
    if (!bool)
    {
      if (!bool)
      {
        if (i == paramInt1 * paramInt3) {
          if (bool) {
            break label321;
          }
        }
      }
      else {
        if (n == paramInt2 * paramInt3) {
          break label320;
        }
      }
      a.i.n.a("Crossing found, but not for this segments:");
      a.i.n.a("at " + paramObject1);
    }
    else
    {
      label202:
      label204:
      if (!bool)
      {
        if (i != paramInt1 * paramInt3) {
          a.i.n.a("Is: " + i + " Should: " + paramInt1 + " Seg: " + paramObject2);
        }
        if (bool) {}
      }
      else if (n != paramInt2 * paramInt3)
      {
        a.i.n.a("Is: " + n + " Should: " + paramInt2 + " Seg: " + paramObject3);
      }
      return false;
    }
    label320:
    label321:
    return true;
  }
  
  public static abstract interface j_
  {
    public abstract void a(c.i_ parami_);
  }
  
  public static abstract interface h_
  {
    public abstract void a(Object paramObject1, Object paramObject2);
  }
  
  class e_
    implements Comparator, l.j_
  {
    Comparator a = c.this.e.f();
    
    e_() {}
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      if (!c.m) {
        if (paramObject1 == paramObject2) {
          return 0;
        }
      }
      c.c_ localc_1 = (c.c_)paramObject1;
      c.c_ localc_2 = (c.c_)paramObject2;
      return this.a.compare(localc_2.i, localc_1.i);
    }
  }
  
  class d_
    implements Comparator, l.j_
  {
    Comparator a = c.this.e.f();
    
    d_() {}
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      if (!c.m) {
        if (paramObject1 == paramObject2) {
          return 0;
        }
      }
      c.c_ localc_1 = (c.c_)paramObject1;
      c.c_ localc_2 = (c.c_)paramObject2;
      return this.a.compare(localc_1.i, localc_2.i);
    }
  }
  
  class f_
    implements Comparator, l.j_
  {
    private a.c.n a;
    private c.e_ b;
    
    public f_(a.c.n paramn)
    {
      this.a = paramn;
      this.b = new c.e_(c.this);
    }
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      if (paramObject1 == paramObject2) {
        return 0;
      }
      int i = this.b.compare(this.a.get(paramObject1), this.a.get(paramObject2));
      if ((c.m) || (i != 0)) {
        return i;
      }
      c.c_ localc_1 = (c.c_)this.a.get(paramObject1);
      c.c_ localc_2 = (c.c_)this.a.get(paramObject2);
      return l.a(localc_2.d(), localc_1.d());
    }
  }
  
  class b_
    implements Comparator, l.j_
  {
    Object a;
    Comparator b = new c.e_(c.this);
    
    b_() {}
    
    void a(Object paramObject)
    {
      this.a = paramObject;
    }
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      c.c_ localc_1 = (c.c_)paramObject1;
      c.c_ localc_2 = (c.c_)paramObject2;
      int i = c.this.e.a(localc_2.d, localc_2.f, this.a);
      if (!c.m) {
        if (i != 0) {
          return -i;
        }
      }
      return this.b.compare(localc_1, localc_2);
    }
  }
  
  private class g_
  {
    private z a = new z();
    private c.b_ c = new c.b_(c.this);
    
    private g_() {}
    
    void a(Object paramObject, ArrayList paramArrayList, c.c_[] paramArrayOfc_)
    {
      boolean bool = c.m;
      int k = c.l;
      paramArrayList.clear();
      v localv1 = this.a.f();
      v localv2 = null;
      v localv3 = null;
      int i = 0;
      if (localv1 != null) {}
      do
      {
        c.c_ localc_ = (c.c_)this.a.g(localv1);
        int j = c.this.e.d(localc_.i, paramObject);
        if ((!bool) && (k != 0)) {
          return;
        }
        if (!bool) {
          if (j > 0) {
            localv2 = localv1;
          }
        }
        if (!bool) {
          if (j == 0) {
            if (i != 0) {
              throw new RuntimeException("YStruct not correct on get !");
            }
          }
        }
        while (k != 0) {
          do
          {
            paramArrayList.add(localc_);
            localc_ = localc_.j;
          } while (localc_ != null);
        }
        if (j < 0)
        {
          if (!bool) {
            if (i == 0) {
              localv3 = localv1;
            }
          }
          i = 1;
        }
        localv1 = this.a.c(localv1);
        if (k == 0) {
          break;
        }
        paramArrayOfc_[0] = ((c.c_)this.a.g(localv2));
      } while (bool);
      paramArrayOfc_[1] = ((c.c_)this.a.g(localv3));
    }
    
    void a(Object paramObject, c.c_ paramc_)
    {
      boolean bool = c.m;
      int j = c.l;
      v localv = this.a.f();
      this.c.a(paramObject);
      int i = -1;
      if ((localv != null) && (i < 0)) {}
      Object localObject1;
      label175:
      do
      {
        localObject1 = (c.c_)this.a.g(localv);
        i = this.c.compare(paramc_, localObject1);
        Object localObject2;
        if (!bool) {
          if (i == 0)
          {
            localObject2 = null;
            while (((c.c_)localObject1).d() < paramc_.d())
            {
              localObject2 = localObject1;
              localObject1 = ((c.c_)localObject1).j;
              if (localObject1 == null) {
                break;
              }
            }
            if (!bool)
            {
              if (localObject2 != null)
              {
                paramc_.a(((c.c_)localObject2).j);
                ((c.c_)localObject2).a(paramc_);
                if (bool) {
                  break label175;
                }
                if (j == 0) {}
              }
              else
              {
                localObject1 = (c.c_)this.a.g(localv);
              }
            }
            else
            {
              paramc_.a((c.c_)localObject1);
              this.a.a(localv, paramc_);
            }
            paramc_.a(localv);
            return;
          }
        }
        if (!bool)
        {
          if (i > 0)
          {
            localObject2 = this.a.a(paramc_, localv);
            paramc_.a((v)localObject2);
            return;
          }
          localv = this.a.c(localv);
        }
        if (j == 0) {
          break;
        }
        localObject1 = this.a.b(paramc_, null);
      } while (bool);
      paramc_.a((v)localObject1);
    }
    
    void a(c.c_ paramc_)
    {
      boolean bool = c.m;
      int i = c.l;
      c.c_ localc_ = (c.c_)this.a.g(paramc_.b);
      if (!bool) {
        if (localc_ == paramc_)
        {
          if ((bool) || (paramc_.j == null))
          {
            this.a.h(localc_.b);
            if (!bool) {
              if (i == 0) {
                return;
              }
            }
          }
          else
          {
            this.a.a(paramc_.b, paramc_.j);
          }
          if (i == 0) {
            return;
          }
        }
      }
      do
      {
        do
        {
          if (localc_.j == paramc_) {
            break;
          }
          localc_ = localc_.j;
          if ((!bool) && (i != 0)) {
            return;
          }
        } while (i == 0);
      } while (bool);
      localc_.j = paramc_.j;
    }
    
    void a(Object paramObject)
    {
      boolean bool = c.m;
      int j = c.l;
      ArrayList localArrayList = new ArrayList();
      v localv1 = this.a.f();
      v localv2 = null;
      int i = 0;
      label146:
      do
      {
        if (localv1 == null) {
          break;
        }
        c.c_ localc_ = (c.c_)this.a.g(localv1);
        if (bool) {
          return;
        }
        if (j != 0) {
          break label158;
        }
        if ((bool) || (c.this.e.h(localc_.i, paramObject)))
        {
          if (!bool)
          {
            if (i != 0) {
              throw new RuntimeException("YStruct not correct on swap !");
            }
            localv2 = localv1;
            localArrayList.add(localc_);
          }
          if (bool) {
            continue;
          }
          if (j == 0) {}
        }
        else
        {
          if (bool) {
            break label146;
          }
          if (localv2 != null) {
            i = 1;
          }
        }
        localv1 = this.a.c(localv1);
      } while (j == 0);
      if (!bool) {
        label158:
        a(localArrayList);
      }
    }
    
    void a(ArrayList paramArrayList)
    {
      boolean bool = c.m;
      int j = c.l;
      if (paramArrayList.size() == 0) {
        return;
      }
      v localv = this.a.f();
      Object localObject = paramArrayList.get(0);
      if (this.a.g(localv) != localObject) {
        localv = this.a.c(localv);
      }
      while (bool) {
        if (j == 0) {
          break;
        }
      }
      int i = paramArrayList.size() - 1;
      if (i >= 0) {
        if (!bool) {
          if (!this.a.g(localv).equals(paramArrayList.get(paramArrayList.size() - 1 - i))) {
            throw new RuntimeException("Cannot swap segments");
          }
        }
      }
      while (bool)
      {
        c.c_ localc_ = (c.c_)paramArrayList.get(i);
        this.a.a(localv, localc_);
        while (localc_ != null)
        {
          localc_.a(localv);
          localc_ = localc_.j;
        }
        localv = this.a.c(localv);
        i--;
        do
        {
          if (j != 0) {
            break;
          }
        } while (bool);
        if (j == 0) {
          break;
        }
      }
    }
    
    c.c_ c(c.c_ paramc_)
    {
      v localv = this.a.c(paramc_.b);
      if (!c.m) {
        if (localv == null) {
          return null;
        }
      }
      return (c.c_)this.a.g(localv);
    }
    
    c.c_ d(c.c_ paramc_)
    {
      v localv = this.a.d(paramc_.b);
      if (!c.m) {
        if (localv == null) {
          return null;
        }
      }
      return (c.c_)this.a.g(localv);
    }
    
    g_(c.0 param0)
    {
      this();
    }
  }
  
  public static class i_
  {
    public ArrayList a;
    public ArrayList b;
    Object c;
    public static boolean d;
    
    public i_(Object paramObject)
    {
      this.c = paramObject;
      this.a = new ArrayList();
      this.b = new ArrayList();
    }
    
    public Object a()
    {
      return this.c;
    }
    
    public String toString()
    {
      return this.c.toString();
    }
  }
  
  public class c_
  {
    e a;
    v b;
    Object d;
    Object f;
    Object g;
    int h;
    Object i;
    c_ j;
    public static boolean k;
    
    public c_(Object paramObject1, Object paramObject2, Object paramObject3, int paramInt)
    {
      this.d = paramObject1;
      this.f = paramObject2;
      this.h = paramInt;
      this.g = paramObject3;
      this.i = c.this.e.e(this.d, this.f);
      this.j = null;
    }
    
    public void a(c_ paramc_)
    {
      this.j = paramc_;
    }
    
    public boolean a()
    {
      return this.j != null;
    }
    
    public void a(v paramv)
    {
      this.b = paramv;
    }
    
    public String toString()
    {
      return this.d + " " + this.f;
    }
    
    public boolean c()
    {
      return this.d.equals(c.this.e.c(this.g));
    }
    
    public int d()
    {
      return this.h;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.d.a.c

 * JD-Core Version:    0.7.0.1

 */